//竞价品信息
import request from '@/utils/request'
/**----------------------------------竞价品-------------------------------------------- */
// 查询竞价品列表
export function listGoodsInfo(query) {
  return request({
    url: '/pms/system/goodsInfo/list',
    method: 'get',
    params: query
  })
}
//新增竞价品
export function addGoodsInfo(data) {
  return request({
    url: '/pms/system/goodsInfo/add',
    method: 'post',
    data
  })
}
//编辑竞价品
export function editGoodsInfo(data) {
  return request({
    url: '/pms/system/goodsInfo/update',
    method: 'post',
    data
  })
}
//删除竞价品
export function delGoodsInfo(params) {
  return request({
    url: '/pms/system/goodsInfo/delById',
    method: 'post',
    params
  })
}

//竞价品转场
export function saveGoodsTurnAb(data) {
  return request({
    url: '/pms/system/goodsTurnAb/saveGoodsTurnAb',
    method: 'post',
    data
  })
}

//竞价品转场记录
export function listGoodsTurnAb(query) {
  return request({
    url: '/pms/system/goodsTurnAb/list',
    method: 'get',
    params: query
  })
}

//一键上下架
export function batchUpGoodsInfo(data) {
  return request({
    url: '/pms/system/goodsInfo/batchUp',
    method: 'post',
    data
  })
}

/**----------------------------------消费品-------------------------------------------- */
// 查询消费品列表
export function listGoodsconsumer(params) {
  return request({
    url: '/pms/system/goodsconsumer/list',
    method: 'get',
    params
  })
}
//新增竞价品
export function addGoodsconsumer(data) {
  return request({
    url: '/pms/system/goodsconsumer/add',
    method: 'post',
    data
  })
}
//编辑竞价品
export function editGoodsconsumer(data) {
  return request({
    url: '/pms/system/goodsconsumer/update',
    method: 'post',
    data
  })
}
//删除竞价品
export function delGoodsconsumer(params) {
  return request({
    url: '/pms/system/goodsconsumer/delById',
    method: 'post',
    params
  })
}
//一键上下架
export function batchUpGoodsconsumer(data) {
  return request({
    url: '/pms/system/goodsconsumer/batchUp',
    method: 'post',
    data
  })
}
/**----------------------------------开馆之礼-------------------------------------------- */
// 查询开馆之礼列表
export function listGoodsvenuesgift(params) {
  return request({
    url: '/pms/system/goodsvenuesgift/list',
    method: 'get',
    params
  })
}

// 查询开馆之礼详情
export function detailGoodsvenuesgift(params) {
  return request({
    url: '/pms/system/goodsvenuesgift/getById',
    method: 'get',
    params
  })
}

// 修改开馆之礼
export function editGoodsvenuesgift(data) {
  return request({
    url: '/pms/system/goodsvenuesgift/update',
    method: 'post',
    data
  })
}

// 新增开馆之礼
export function addGoodsvenuesgift(data) {
  return request({
    url: '/pms/system/goodsvenuesgift/add',
    method: 'post',
    data
  })
}

// 复制开馆之礼
export function addCopyOne(data) {
  return request({
    url: '/pms/system/goodsvenuesgift/copyOne',
    method: 'post',
    data
  })
}


// 删除开馆之礼
export function delGoodsvenuesgift(params) {
  return request({
    url: '/pms/system/goodsvenuesgift/delById',
    method: 'post',
    params
  })
}

//一键上下架
export function batchUpGoodsvenuesgift(data) {
  return request({
    url: '/pms/system/goodsvenuesgift/batchUp',
    method: 'post',
    data
  })
}


/**----------------------- 开馆之礼赠送商品 ---------------------------------------- */

// 查询赠送商品列表
export function listGoodsGiftSend(params) {
  return request({
    url: '/pms/system/goodsGiftSend/list',
    method: 'get',
    params
  })
}
//新增赠送商品
export function addGoodGiftSend(data) {
  return request({
    url: '/pms/system/goodsGiftSend/add',
    method: 'post',
    data
  })
}
//编辑赠送商品
export function editGoodGiftSend(data) {
  return request({
    url: '/pms/system/goodsGiftSend/update',
    method: 'post',
    data
  })
}
//删除赠送商品
export function delGoodGiftSend(params) {
  return request({
    url: '/pms/system/goodsGiftSend/delete',
    method: 'post',
    params
  })
}


/**----------------------- 消费品目录 ---------------------------------------- */
export function listConsumeCategory(params) {
  return request({
    url: '/pms/system/consumeCategory/list',
    method: 'get',
    params
  })
}

export function listSelectConsumeCategory(params) {
  return request({
    url: '/pms/system/consumeCategory/listOption',
    method: 'get',
    params
  })
}

//修改消费品目录
export function addConsumeCategory(data) {
  return request({
    url: '/pms/system/consumeCategory/add',
    method: 'post',
    data
  })
}

//新增消费品目录
export function editConsumeCategory(data) {
  return request({
    url: '/pms/system/consumeCategory/update',
    method: 'post',
    data
  })
}

//删除赠送商品
export function delConsumeCategory(params) {
  return request({
    url: '/pms/system/consumeCategory/delById',
    method: 'post',
    params
  })
}

/**----------------------- 置换商城 ---------------------------------------- */


export function listGoodsReplacement(params) {
  return request({
    url: '/pms/system/goodsReplacement/list',
    method: 'get',
    params
  })
}

//修改
export function editGoodsReplacement(data) {
  return request({
    url: '/pms/system/goodsReplacement/update',
    method: 'post',
    data
  })
}

//新增
export function addGoodsReplacement(data) {
  return request({
    url: '/pms/system/goodsReplacement/add',
    method: 'post',
    data
  })
}

//删除
export function delGoodsReplacement(params) {
  return request({
    url: '/pms/system/goodsReplacement/delById',
    method: 'post',
    params
  })
}


//一键上下架
export function batchUpGoodsReplacement(data) {
  return request({
    url: '/pms/system/goodsReplacement/batchUp',
    method: 'post',
    data
  })
}



/**----------------------- 转场商品---------------------------------------- */


export function listTurnGoods(params) {
  return request({
    url: '/pms/system/goodsTurnInfo/list',
    method: 'get',
    params
  })
}

//修改
export function editTurnGoods(data) {
  return request({
    url: '/pms/system/goodsTurnInfo/update',
    method: 'post',
    data
  })
}

//新增
export function addTurnGoods(data) {
  return request({
    url: '/pms/system/goodsTurnInfo/add',
    method: 'post',
    data
  })
}

//删除
export function delTurnGoods(params) {
  return request({
    url: '/pms/system/goodsTurnInfo/delById',
    method: 'post',
    params
  })
}


//一键上下架
export function batchUpTurnGoods(data) {
  return request({
    url: '/pms/system/goodsTurnInfo/batchUp',
    method: 'post',
    data
  })
}
